/**
 * Alipay.com Inc.
 * Copyright (c) 2004-2024 All Rights Reserved.
 */
package com.alipay.demo.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.List;

/**
 * @author jishupei.jsp
 * @version : LocalItemCreateRequest, v0.1 2024年03月21日 11:20 上午 jishupei.jsp Exp $
 */
@ApiModel(description = "本地商品创建模型")
public class LocalItemCreateRequest implements Serializable {
    private static final long serialVersionUID = 89765465465L;

//    /**
//     * 商品类型（1：团购，2：代金）
//     */
//    private String itemType = "1";

    /**
     * 类目ID
     */
    @ApiModelProperty(value = "类目ID", required = true)
    private String categoryId;

    /**
     * 商品名称
     */
    @ApiModelProperty(value = "商品名称")
    private String productName;

    /**
     * 商家侧商品ID
     */
    @ApiModelProperty(value = "商家侧商品ID", required = true)
    private String outItemId;

    /**
     * 商家名称
     */
    @ApiModelProperty(value = "商家名称")
    private String merchantName = "测试商家";

    /**
     * 开始时间
     */
    @ApiModelProperty(value = "开始时间")
    private String startTime;

    /**
     * 结束时间
     */
    @ApiModelProperty(value = "结束时间")
    private String endTime;

    /**
     * 券码生成方式，1-三方码核销（商家码核销），2-一方码核销（支付宝码核销）
     */
    @ApiModelProperty(value = "券码生成方式，1-三方码核销（商家码核销），2-一方码核销（支付宝码核销），默认1")
    private String codeSourceType;

    /**
     * 门店ID列表
     */
    @ApiModelProperty(value = "可使用门店ID列表，默认获取所有可用门店")
    private List<String> shopIds;

    /**
     * 标品ID
     */
    @ApiModelProperty(value = "标品ID，创建日历房商品时必选，从本地商品酒店日历房模块中获取")
    private String spuId;

    /**
     * Getter method for property <tt>categoryId</tt>.
     *
     * @return property value of categoryId
     */
    public String getCategoryId() {
        return categoryId;
    }

    /**
     * Setter method for property <tt>categoryId</tt>.
     *
     * @param categoryId value to be assigned to property categoryId
     */
    public void setCategoryId(String categoryId) {
        this.categoryId = categoryId;
    }

    /**
     * Getter method for property <tt>productName</tt>.
     *
     * @return property value of productName
     */
    public String getProductName() {
        return productName;
    }

    /**
     * Setter method for property <tt>productName</tt>.
     *
     * @param productName value to be assigned to property productName
     */
    public void setProductName(String productName) {
        this.productName = productName;
    }

    /**
     * Getter method for property <tt>outItemId</tt>.
     *
     * @return property value of outItemId
     */
    public String getOutItemId() {
        return outItemId;
    }

    /**
     * Setter method for property <tt>outItemId</tt>.
     *
     * @param outItemId value to be assigned to property outItemId
     */
    public void setOutItemId(String outItemId) {
        this.outItemId = outItemId;
    }

    /**
     * Getter method for property <tt>merchantName</tt>.
     *
     * @return property value of merchantName
     */
    public String getMerchantName() {
        return merchantName;
    }

    /**
     * Setter method for property <tt>merchantName</tt>.
     *
     * @param merchantName value to be assigned to property merchantName
     */
    public void setMerchantName(String merchantName) {
        this.merchantName = merchantName;
    }

    /**
     * Getter method for property <tt>startTime</tt>.
     *
     * @return property value of startTime
     */
    public String getStartTime() {
        if (startTime == null || startTime.length() == 0) {
            // 今天的00:00:00
            startTime = LocalDateTime.now()
                    .withHour(0)
                    .withMinute(0)
                    .withSecond(0)
                    .format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
        }
        return startTime;
    }

    /**
     * Setter method for property <tt>startTime</tt>.
     *
     * @param startTime value to be assigned to property startTime
     */
    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    /**
     * Getter method for property <tt>endTime</tt>.
     *
     * @return property value of endTime
     */
    public String getEndTime() {
        if (endTime == null || endTime.length() == 0) {
            // 两个月后的23:59:59
            endTime = LocalDateTime.now()
                    .plusMonths(2)
                    .withHour(23)
                    .withMinute(59)
                    .withSecond(59)
                    .format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
        }
        return endTime;
    }

    /**
     * Setter method for property <tt>endTime</tt>.
     *
     * @param endTime value to be assigned to property endTime
     */
    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    /**
     * Getter method for property <tt>codeSourceType</tt>.
     *
     * @return property value of codeSourceType
     */
    public String getCodeSourceType() {
        return codeSourceType;
    }

    /**
     * Setter method for property <tt>codeSourceType</tt>.
     *
     * @param codeSourceType value to be assigned to property codeSourceType
     */
    public void setCodeSourceType(String codeSourceType) {
        this.codeSourceType = codeSourceType;
    }

    /**
     * Getter method for property <tt>shopIds</tt>.
     *
     * @return property value of shopIds
     */
    public List<String> getShopIds() {
        return shopIds;
    }

    /**
     * Setter method for property <tt>shopIds</tt>.
     *
     * @param shopIds value to be assigned to property shopIds
     */
    public void setShopIds(List<String> shopIds) {
        this.shopIds = shopIds;
    }

    /**
     * Getter method for property <tt>spuId</tt>.
     *
     * @return property value of spuId
     */
    public String getSpuId() {
        return spuId;
    }

    /**
     * Setter method for property <tt>spuId</tt>.
     *
     * @param spuId value to be assigned to property spuId
     */
    public void setSpuId(String spuId) {
        this.spuId = spuId;
    }
}
